/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.jeesite.common.collect.ListUtils;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 索韬用户表Entity
 * @author HOHD
 * @version 2020-12-09
 */
@Table(name="st_user", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="name", attrName="name", label="姓名", queryType=QueryType.LIKE),
		@Column(name="age", attrName="age", label="年龄"),
		@Column(name="gander", attrName="gander", label="性别"),
	}, orderBy="a.id DESC"
)
public class StUser extends DataEntity<StUser> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 姓名
	private Integer age;		// 年龄
	private Integer gander;		// 性别
	private List<StPhone> stPhoneList = ListUtils.newArrayList();		// 子表列表
	
	public StUser() {
		this(null);
	}

	public StUser(String id){
		super(id);
	}
	
	@Length(min=0, max=4, message="姓名长度不能超过 4 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}
	
	public Integer getGander() {
		return gander;
	}

	public void setGander(Integer gander) {
		this.gander = gander;
	}
	
	public List<StPhone> getStPhoneList() {
		return stPhoneList;
	}

	public void setStPhoneList(List<StPhone> stPhoneList) {
		this.stPhoneList = stPhoneList;
	}
	
}